﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CRMAdapter.DecisionLogicService;
using CRMEntity;

namespace CRMWeb.Pages
{
    public partial class TestDecisionLogic1 : CRMWeb.Utilities.BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button2_Click(object sender, EventArgs e)
        {

            var entity = new DecisionLogicEntity();
            entity.serviceKey = txtServiceKey.Text;
            entity.siteUserGuid = txtSiteUserGuid.Text;
            entity.profileGuid = txtProfileGuid.Text;
            entity.customerId = txtCustomerId.Text;
            entity.firstName = txtFirstName.Text;
            entity.lastName = txtLastName.Text;
            entity.accountNumber = txtAccountNumber.Text;
            entity.routingNumber = txtRoutingNumber.Text;
            entity.contentServiceId = Int32.Parse(txtContentServiceId.Text);
            string RequestCode = CRMAdapter.AppCode.DecisionLogic.CreateRequestCode(entity);
            Response.Redirect("TestDecisionlogic.aspx?requestCode=" + RequestCode);
        }
    }
}